-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(autoware_utils): address self-intersecting polygons in random_concave_generator and handle empty inners() during triangulation #8995
base: main
Are you sure you want to change the base?
Conversation
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
double x3 = points[2].x(); | ||
double y3 = points[2].y(); | ||
|
||
return std::abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a source for this formula ?
Or if this function is only needed for the test then just use boost::geometry::area
in the tests.
return std::abs((x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2)) / 2.0); | ||
} | ||
|
||
double calculate_total_triangle(const std::vector<autoware::universe_utils::Polygon2d> & triangles) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name of this function is not clear.
I also think it only needs to be defined in the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will move the function to test
and use boost::geometry::area
instead
Description
Fix two issues in autoware_utils:
Self-intersecting polygons in random_concave_generator: fix
is_valid
function to properly validate inserted edges.Handling empty inners() during triangulation: ensures that empty inners() are properly handled in the triangulation process.
Related links
How was this PR tested?
colcon test --packages-select autoware_universe_utils
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.